﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SQLite;

namespace MOJsdk
{
    public class MOJBasicMovieClass
    {
        [PrimaryKey, Unique]
        public string MovieCode
        { get; set; }

        public string MovieTitle
        { get; set; }
        public string OriginalTitle
        { get; set; }
        public string MovieYear
        { get; set; }
        public string MovieGenres
        { get; set; }
        public string MovieCast
        { get; set; }
        public string MovieDirectors
        { get; set; }
        public string MovieWriters
        { get; set; }
        public string IMDBID
        { get; set; }
        public string Tagline 
        { get; set; }

        [Ignore]
        public IList<string> Genres
        {
            get { return MovieGenres.ToList(";"); }
            set { MovieGenres = value.ToString(";"); }
        }
        [Ignore]
        public IList<string> Cast
        {
            get { return MovieCast.ToList(";"); }
            set { MovieCast = value.ToString(";"); }
        }
        [Ignore]
        public IList<string> Director
        {
            get { return MovieDirectors.ToList(";"); }
            set { MovieDirectors = value.ToString(";"); }
        }
        [Ignore]
        public IList<string> Writer
        {
            get { return MovieWriters.ToList(";"); }
            set { MovieWriters = value.ToString(";"); }
        }

        public int CoverID
        { get; set; }
    }

    public enum MojMovieOrders
    {
        MovieTitle = 0,
        MovieYear = 1,
        MovieGenres = 2,
        MovieDirectors = 3,
        MovieWriters = 4,
        InMovieTitle = 10,
        InMovieYear = 11,
        InMovieGenres = 12,
        InMovieDirectors = 13,
        InMovieWriters = 14,
    }
}
